/*
 * File: control2.h
 *
 * Real-Time Workshop code generated for Simulink model control2.
 *
 * Model version                        : 1.36
 * Real-Time Workshop file version      : 7.6  (R2010b)  03-Aug-2010
 * Real-Time Workshop file generated on : Fri Jun 20 22:55:58 2025
 * TLC version                          : 7.6 (Jul 13 2010)
 * C/C++ source code generated on       : Fri Jun 20 22:55:58 2025
 *
 * Target selection: ert.tlc
 * Embedded hardware selection: 32-bit Generic
 * Code generation objectives: Unspecified
 * Validation result: Not run
 */

#ifndef RTW_HEADER_control2_h_
#define RTW_HEADER_control2_h_
#ifndef control2_COMMON_INCLUDES_
# define control2_COMMON_INCLUDES_
#include <stddef.h>
#include <math.h>
#include <string.h>
#include "rtwtypes.h"
#include "rt_nonfinite.h"
#include "rtGetInf.h"
#include "rtGetNaN.h"
#endif                                 /* control2_COMMON_INCLUDES_ */

#include "control2_types.h"

/* Macros for accessing real-time model data structure */
#ifndef rtmGetErrorStatus
# define rtmGetErrorStatus(rtm)        ((rtm)->errorStatus)
#endif

#ifndef rtmSetErrorStatus
# define rtmSetErrorStatus(rtm, val)   ((rtm)->errorStatus = (val))
#endif

/* Block signals (auto storage) */
typedef struct {
  real_T Constant2[3];                 /* '<S1>/Constant2' */
} BlockIO_control2;

/* Block states (auto storage) for system '<Root>' */
typedef struct {
  real_T UnitDelay_DSTATE;             /* '<Root>/Unit Delay' */
  real_T DiscreteTimeIntegrator_DSTATE[3];/* '<S2>/Discrete-Time Integrator' */
  real_T DiscreteTimeIntegrator_DSTATE_b[3];/* '<S1>/Discrete-Time Integrator' */
  real_T Memory8_PreviousInput;        /* '<S14>/Memory8' */
  real_T Memory7_PreviousInput;        /* '<S14>/Memory7' */
  real_T Memory6_PreviousInput;        /* '<S14>/Memory6' */
  real_T Memory5_PreviousInput;        /* '<S14>/Memory5' */
  real_T Memory4_PreviousInput;        /* '<S14>/Memory4' */
  real_T Memory3_PreviousInput;        /* '<S14>/Memory3' */
  real_T Memory2_PreviousInput;        /* '<S14>/Memory2' */
  real_T Memory1_PreviousInput;        /* '<S14>/Memory1' */
  real_T Memory_PreviousInput;         /* '<S14>/Memory' */
  real_T Memory8_PreviousInput_n;      /* '<S9>/Memory8' */
  real_T Memory7_PreviousInput_g;      /* '<S9>/Memory7' */
  real_T Memory6_PreviousInput_d;      /* '<S9>/Memory6' */
  real_T Memory5_PreviousInput_p;      /* '<S9>/Memory5' */
  real_T Memory4_PreviousInput_d;      /* '<S9>/Memory4' */
  real_T Memory3_PreviousInput_c;      /* '<S9>/Memory3' */
  real_T Memory2_PreviousInput_k;      /* '<S9>/Memory2' */
  real_T Memory1_PreviousInput_n;      /* '<S9>/Memory1' */
  real_T Memory_PreviousInput_j;       /* '<S9>/Memory' */
  real_T Memory8_PreviousInput_h;      /* '<S11>/Memory8' */
  real_T Memory7_PreviousInput_l;      /* '<S11>/Memory7' */
  real_T Memory6_PreviousInput_p;      /* '<S11>/Memory6' */
  real_T Memory5_PreviousInput_o;      /* '<S11>/Memory5' */
  real_T Memory4_PreviousInput_p;      /* '<S11>/Memory4' */
  real_T Memory3_PreviousInput_ci;     /* '<S11>/Memory3' */
  real_T Memory2_PreviousInput_d;      /* '<S11>/Memory2' */
  real_T Memory1_PreviousInput_j;      /* '<S11>/Memory1' */
  real_T Memory_PreviousInput_k;       /* '<S11>/Memory' */
  real_T Memory8_PreviousInput_k;      /* '<S12>/Memory8' */
  real_T Memory7_PreviousInput_ga;     /* '<S12>/Memory7' */
  real_T Memory6_PreviousInput_i;      /* '<S12>/Memory6' */
  real_T Memory5_PreviousInput_f;      /* '<S12>/Memory5' */
  real_T Memory4_PreviousInput_i;      /* '<S12>/Memory4' */
  real_T Memory3_PreviousInput_c0;     /* '<S12>/Memory3' */
  real_T Memory2_PreviousInput_m;      /* '<S12>/Memory2' */
  real_T Memory1_PreviousInput_jj;     /* '<S12>/Memory1' */
  real_T Memory_PreviousInput_a;       /* '<S12>/Memory' */
  real_T Memory8_PreviousInput_kl;     /* '<S13>/Memory8' */
  real_T Memory7_PreviousInput_j;      /* '<S13>/Memory7' */
  real_T Memory6_PreviousInput_l;      /* '<S13>/Memory6' */
  real_T Memory5_PreviousInput_a;      /* '<S13>/Memory5' */
  real_T Memory4_PreviousInput_n;      /* '<S13>/Memory4' */
  real_T Memory3_PreviousInput_l;      /* '<S13>/Memory3' */
  real_T Memory2_PreviousInput_g;      /* '<S13>/Memory2' */
  real_T Memory1_PreviousInput_j4;     /* '<S13>/Memory1' */
  real_T Memory_PreviousInput_i;       /* '<S13>/Memory' */
  real_T Memory8_PreviousInput_f;      /* '<S15>/Memory8' */
  real_T Memory7_PreviousInput_c;      /* '<S15>/Memory7' */
  real_T Memory6_PreviousInput_f;      /* '<S15>/Memory6' */
  real_T Memory5_PreviousInput_e;      /* '<S15>/Memory5' */
  real_T Memory4_PreviousInput_k;      /* '<S15>/Memory4' */
  real_T Memory3_PreviousInput_cl;     /* '<S15>/Memory3' */
  real_T Memory2_PreviousInput_n;      /* '<S15>/Memory2' */
  real_T Memory1_PreviousInput_f;      /* '<S15>/Memory1' */
  real_T Memory_PreviousInput_l;       /* '<S15>/Memory' */
  real_T Memory8_PreviousInput_p;      /* '<S16>/Memory8' */
  real_T Memory7_PreviousInput_a;      /* '<S16>/Memory7' */
  real_T Memory6_PreviousInput_g;      /* '<S16>/Memory6' */
  real_T Memory5_PreviousInput_m;      /* '<S16>/Memory5' */
  real_T Memory4_PreviousInput_a;      /* '<S16>/Memory4' */
  real_T Memory3_PreviousInput_i;      /* '<S16>/Memory3' */
  real_T Memory2_PreviousInput_o;      /* '<S16>/Memory2' */
  real_T Memory1_PreviousInput_d;      /* '<S16>/Memory1' */
  real_T Memory_PreviousInput_j2;      /* '<S16>/Memory' */
  real_T Memory8_PreviousInput_l;      /* '<S17>/Memory8' */
  real_T Memory7_PreviousInput_jc;     /* '<S17>/Memory7' */
  real_T Memory6_PreviousInput_c;      /* '<S17>/Memory6' */
  real_T Memory5_PreviousInput_mr;     /* '<S17>/Memory5' */
  real_T Memory4_PreviousInput_a5;     /* '<S17>/Memory4' */
  real_T Memory3_PreviousInput_m;      /* '<S17>/Memory3' */
  real_T Memory2_PreviousInput_p;      /* '<S17>/Memory2' */
  real_T Memory1_PreviousInput_jq;     /* '<S17>/Memory1' */
  real_T Memory_PreviousInput_g;       /* '<S17>/Memory' */
  real_T Memory8_PreviousInput_g;      /* '<S18>/Memory8' */
  real_T Memory7_PreviousInput_p;      /* '<S18>/Memory7' */
  real_T Memory6_PreviousInput_m;      /* '<S18>/Memory6' */
  real_T Memory5_PreviousInput_p4;     /* '<S18>/Memory5' */
  real_T Memory4_PreviousInput_ap;     /* '<S18>/Memory4' */
  real_T Memory3_PreviousInput_d;      /* '<S18>/Memory3' */
  real_T Memory2_PreviousInput_c;      /* '<S18>/Memory2' */
  real_T Memory1_PreviousInput_no;     /* '<S18>/Memory1' */
  real_T Memory_PreviousInput_p;       /* '<S18>/Memory' */
  real_T Memory8_PreviousInput_b;      /* '<S10>/Memory8' */
  real_T Memory7_PreviousInput_i;      /* '<S10>/Memory7' */
  real_T Memory6_PreviousInput_k;      /* '<S10>/Memory6' */
  real_T Memory5_PreviousInput_ot;     /* '<S10>/Memory5' */
  real_T Memory4_PreviousInput_da;     /* '<S10>/Memory4' */
  real_T Memory3_PreviousInput_a;      /* '<S10>/Memory3' */
  real_T Memory2_PreviousInput_cf;     /* '<S10>/Memory2' */
  real_T Memory1_PreviousInput_l;      /* '<S10>/Memory1' */
  real_T Memory_PreviousInput_m;       /* '<S10>/Memory' */
  int32_T clockTickCounter;            /* '<Root>/Pulse Generator' */
  int8_T DiscreteTimeIntegrator_PrevRese;/* '<S2>/Discrete-Time Integrator' */
  int8_T DiscreteTimeIntegrator_PrevRe_g;/* '<S1>/Discrete-Time Integrator' */
  uint8_T DiscreteTimeIntegrator_IC_LOADI;/* '<S2>/Discrete-Time Integrator' */
} D_Work_control2;

/* External outputs (root outports fed by signals with auto storage) */
typedef struct {
  real_T Out1[4];                      /* '<Root>/Out1' */
  real_T Out2[3];                      /* '<Root>/Out2' */
} ExternalOutputs_control2;

/* Parameters (auto storage) */
struct Parameters_control2_ {
  real_T Gain3_Gain;                   /* Expression: Tcw_max
                                        * Referenced by: '<S4>/Gain3'
                                        */
  real_T Constant1_Value[3];           /* Expression: kp1_AS01
                                        * Referenced by: '<S5>/Constant1'
                                        */
  real_T Constant_Value[3];            /* Expression: kp_AS01
                                        * Referenced by: '<S5>/Constant'
                                        */
  real_T Gain1_Gain;                   /* Expression: 0
                                        * Referenced by: '<S6>/Gain1'
                                        */
  real_T Constant2_Value[3];           /* Expression: ki1_AS01
                                        * Referenced by: '<S7>/Constant2'
                                        */
  real_T Constant1_Value_m[3];         /* Expression: ki_AS01
                                        * Referenced by: '<S7>/Constant1'
                                        */
  real_T Constant1_Value_l[3];         /* Expression: kd1_AS01
                                        * Referenced by: '<S8>/Constant1'
                                        */
  real_T Constant3_Value[3];           /* Expression: kd_AS01
                                        * Referenced by: '<S8>/Constant3'
                                        */
  real_T Constant3_Value_e[12];        /* Expression: [0,0,0;0,-1,0;0,0,-1;3^0.5/3,-3^0.5/3,-3^0.5/3]
                                        * Referenced by: '<S19>/Constant3'
                                        */
  real_T Constant6_Value[12];          /* Expression: [1,0,0;0,-1,0;0,0,-1;3^0.5/3,-3^0.5/3,-3^0.5/3]
                                        * Referenced by: '<S19>/Constant6'
                                        */
  real_T Constant5_Value[12];          /* Expression: [1,0,0;0,-1,0;0,0,0;3^0.5/3,-3^0.5/3,-3^0.5/3]
                                        * Referenced by: '<S19>/Constant5'
                                        */
  real_T Constant4_Value[12];          /* Expression: [1,0,0;0,0,0;0,0,-1;3^0.5/3,-3^0.5/3,-3^0.5/3]
                                        * Referenced by: '<S19>/Constant4'
                                        */
  real_T Constant1_Value_e[12];        /* Expression: [1,0,0;0,-1,0;0,0,-1;3^0.5/3*0,-3^0.5/3*0,-3^0.5/3*0]
                                        * Referenced by: '<S19>/Constant1'
                                        */
  real_T Constant_Value_p[12];         /* Expression: Cwheelb
                                        * Referenced by: '<S19>/Constant'
                                        */
  real_T PulseGenerator_Amp;           /* Expression: 1
                                        * Referenced by: '<Root>/Pulse Generator'
                                        */
  real_T PulseGenerator_Period;        /* Computed Parameter: PulseGenerator_Period
                                        * Referenced by: '<Root>/Pulse Generator'
                                        */
  real_T PulseGenerator_Duty;          /* Computed Parameter: PulseGenerator_Duty
                                        * Referenced by: '<Root>/Pulse Generator'
                                        */
  real_T PulseGenerator_PhaseDelay;    /* Expression: 0
                                        * Referenced by: '<Root>/Pulse Generator'
                                        */
  real_T Gain_Gain;                    /* Expression: 1
                                        * Referenced by: '<Root>/Gain'
                                        */
  real_T UnitDelay_X0;                 /* Expression: 0
                                        * Referenced by: '<Root>/Unit Delay'
                                        */
  real_T Gain1_Gain_l;                 /* Expression: 1
                                        * Referenced by: '<S2>/Gain1'
                                        */
  real_T DiscreteTimeIntegrator_gainval;/* Computed Parameter: DiscreteTimeIntegrator_gainval
                                         * Referenced by: '<S2>/Discrete-Time Integrator'
                                         */
  real_T Saturation3_UpperSat;         /* Expression: Hmax
                                        * Referenced by: '<S2>/Saturation3'
                                        */
  real_T Saturation3_LowerSat;         /* Expression: -Hmax
                                        * Referenced by: '<S2>/Saturation3'
                                        */
  real_T Gain3_Gain_i;                 /* Expression: 1/Jw
                                        * Referenced by: '<S2>/Gain3'
                                        */
  real_T Saturation1_UpperSat;         /* Expression: W_max/30*pi
                                        * Referenced by: '<S2>/Saturation1'
                                        */
  real_T Saturation1_LowerSat;         /* Expression: -W_max/30*pi
                                        * Referenced by: '<S2>/Saturation1'
                                        */
  real_T Gain4_Gain;                   /* Expression: 30/pi
                                        * Referenced by: '<S2>/Gain4'
                                        */
  real_T Constant2_Value_o[3];         /* Expression: zeros(3,1)
                                        * Referenced by: '<S1>/Constant2'
                                        */
  real_T DiscreteTimeIntegrator_gainva_f;/* Computed Parameter: DiscreteTimeIntegrator_gainva_f
                                          * Referenced by: '<S1>/Discrete-Time Integrator'
                                          */
  real_T Gain5_Gain;                   /* Expression: 2
                                        * Referenced by: '<S1>/Gain5'
                                        */
  real_T Saturation_UpperSat[3];       /* Expression: (W_max_maneuver/180*pi*kd_AS01)./kp_AS01
                                        * Referenced by: '<S1>/Saturation'
                                        */
  real_T Saturation_LowerSat[3];       /* Expression: -(W_max_maneuver/180*pi*kd_AS01)./kp_AS01
                                        * Referenced by: '<S1>/Saturation'
                                        */
  real_T Gain_Gain_k;                  /* Expression: 1
                                        * Referenced by: '<S1>/Gain'
                                        */
  real_T Gain1_Gain_i;                 /* Expression: 1
                                        * Referenced by: '<S1>/Gain1'
                                        */
  real_T Saturation2_UpperSat;         /* Expression: 0.01
                                        * Referenced by: '<S1>/Saturation2'
                                        */
  real_T Saturation2_LowerSat;         /* Expression: -0.01
                                        * Referenced by: '<S1>/Saturation2'
                                        */
  real_T Constant_Value_e[3];          /* Expression: ones(3,1)*Tcw_max
                                        * Referenced by: '<S4>/Constant'
                                        */
  real_T Gain4_Gain_l;                 /* Expression: -1
                                        * Referenced by: '<S1>/Gain4'
                                        */
  real_T Gain3_Gain_b;                 /* Expression: -1
                                        * Referenced by: '<S1>/Gain3'
                                        */
  real_T Gain2_Gain;                   /* Expression: 180/pi
                                        * Referenced by: '<S6>/Gain2'
                                        */
  real_T Memory8_X0;                   /* Expression: 0
                                        * Referenced by: '<S14>/Memory8'
                                        */
  real_T Memory7_X0;                   /* Expression: 0
                                        * Referenced by: '<S14>/Memory7'
                                        */
  real_T Memory6_X0;                   /* Expression: 0
                                        * Referenced by: '<S14>/Memory6'
                                        */
  real_T Memory5_X0;                   /* Expression: 0
                                        * Referenced by: '<S14>/Memory5'
                                        */
  real_T Memory4_X0;                   /* Expression: 0
                                        * Referenced by: '<S14>/Memory4'
                                        */
  real_T Memory3_X0;                   /* Expression: 0
                                        * Referenced by: '<S14>/Memory3'
                                        */
  real_T Memory2_X0;                   /* Expression: 0
                                        * Referenced by: '<S14>/Memory2'
                                        */
  real_T Memory1_X0;                   /* Expression: 0
                                        * Referenced by: '<S14>/Memory1'
                                        */
  real_T Memory_X0;                    /* Expression: 0
                                        * Referenced by: '<S14>/Memory'
                                        */
  real_T Gain_Gain_a;                  /* Expression: 1/6
                                        * Referenced by: '<S14>/Gain'
                                        */
  real_T Memory8_X0_d;                 /* Expression: 0
                                        * Referenced by: '<S9>/Memory8'
                                        */
  real_T Memory7_X0_e;                 /* Expression: 0
                                        * Referenced by: '<S9>/Memory7'
                                        */
  real_T Memory6_X0_n;                 /* Expression: 0
                                        * Referenced by: '<S9>/Memory6'
                                        */
  real_T Memory5_X0_a;                 /* Expression: 0
                                        * Referenced by: '<S9>/Memory5'
                                        */
  real_T Memory4_X0_m;                 /* Expression: 0
                                        * Referenced by: '<S9>/Memory4'
                                        */
  real_T Memory3_X0_h;                 /* Expression: 0
                                        * Referenced by: '<S9>/Memory3'
                                        */
  real_T Memory2_X0_o;                 /* Expression: 0
                                        * Referenced by: '<S9>/Memory2'
                                        */
  real_T Memory1_X0_p;                 /* Expression: 0
                                        * Referenced by: '<S9>/Memory1'
                                        */
  real_T Memory_X0_a;                  /* Expression: 0
                                        * Referenced by: '<S9>/Memory'
                                        */
  real_T Gain_Gain_g;                  /* Expression: 1/6
                                        * Referenced by: '<S9>/Gain'
                                        */
  real_T Memory8_X0_e;                 /* Expression: 0
                                        * Referenced by: '<S11>/Memory8'
                                        */
  real_T Memory7_X0_f;                 /* Expression: 0
                                        * Referenced by: '<S11>/Memory7'
                                        */
  real_T Memory6_X0_j;                 /* Expression: 0
                                        * Referenced by: '<S11>/Memory6'
                                        */
  real_T Memory5_X0_l;                 /* Expression: 0
                                        * Referenced by: '<S11>/Memory5'
                                        */
  real_T Memory4_X0_mp;                /* Expression: 0
                                        * Referenced by: '<S11>/Memory4'
                                        */
  real_T Memory3_X0_e;                 /* Expression: 0
                                        * Referenced by: '<S11>/Memory3'
                                        */
  real_T Memory2_X0_p;                 /* Expression: 0
                                        * Referenced by: '<S11>/Memory2'
                                        */
  real_T Memory1_X0_j;                 /* Expression: 0
                                        * Referenced by: '<S11>/Memory1'
                                        */
  real_T Memory_X0_k;                  /* Expression: 0
                                        * Referenced by: '<S11>/Memory'
                                        */
  real_T Gain_Gain_o;                  /* Expression: 1/6
                                        * Referenced by: '<S11>/Gain'
                                        */
  real_T Memory8_X0_p;                 /* Expression: 0
                                        * Referenced by: '<S12>/Memory8'
                                        */
  real_T Memory7_X0_i;                 /* Expression: 0
                                        * Referenced by: '<S12>/Memory7'
                                        */
  real_T Memory6_X0_a;                 /* Expression: 0
                                        * Referenced by: '<S12>/Memory6'
                                        */
  real_T Memory5_X0_b;                 /* Expression: 0
                                        * Referenced by: '<S12>/Memory5'
                                        */
  real_T Memory4_X0_k;                 /* Expression: 0
                                        * Referenced by: '<S12>/Memory4'
                                        */
  real_T Memory3_X0_b;                 /* Expression: 0
                                        * Referenced by: '<S12>/Memory3'
                                        */
  real_T Memory2_X0_e;                 /* Expression: 0
                                        * Referenced by: '<S12>/Memory2'
                                        */
  real_T Memory1_X0_jo;                /* Expression: 0
                                        * Referenced by: '<S12>/Memory1'
                                        */
  real_T Memory_X0_e;                  /* Expression: 0
                                        * Referenced by: '<S12>/Memory'
                                        */
  real_T Gain_Gain_m;                  /* Expression: 1/6
                                        * Referenced by: '<S12>/Gain'
                                        */
  real_T Memory8_X0_ep;                /* Expression: 0
                                        * Referenced by: '<S13>/Memory8'
                                        */
  real_T Memory7_X0_o;                 /* Expression: 0
                                        * Referenced by: '<S13>/Memory7'
                                        */
  real_T Memory6_X0_i;                 /* Expression: 0
                                        * Referenced by: '<S13>/Memory6'
                                        */
  real_T Memory5_X0_b5;                /* Expression: 0
                                        * Referenced by: '<S13>/Memory5'
                                        */
  real_T Memory4_X0_o;                 /* Expression: 0
                                        * Referenced by: '<S13>/Memory4'
                                        */
  real_T Memory3_X0_hg;                /* Expression: 0
                                        * Referenced by: '<S13>/Memory3'
                                        */
  real_T Memory2_X0_a;                 /* Expression: 0
                                        * Referenced by: '<S13>/Memory2'
                                        */
  real_T Memory1_X0_k;                 /* Expression: 0
                                        * Referenced by: '<S13>/Memory1'
                                        */
  real_T Memory_X0_d;                  /* Expression: 0
                                        * Referenced by: '<S13>/Memory'
                                        */
  real_T Gain_Gain_c;                  /* Expression: 1/6
                                        * Referenced by: '<S13>/Gain'
                                        */
  real_T Memory8_X0_o;                 /* Expression: 0
                                        * Referenced by: '<S15>/Memory8'
                                        */
  real_T Memory7_X0_g;                 /* Expression: 0
                                        * Referenced by: '<S15>/Memory7'
                                        */
  real_T Memory6_X0_f;                 /* Expression: 0
                                        * Referenced by: '<S15>/Memory6'
                                        */
  real_T Memory5_X0_h;                 /* Expression: 0
                                        * Referenced by: '<S15>/Memory5'
                                        */
  real_T Memory4_X0_b;                 /* Expression: 0
                                        * Referenced by: '<S15>/Memory4'
                                        */
  real_T Memory3_X0_d;                 /* Expression: 0
                                        * Referenced by: '<S15>/Memory3'
                                        */
  real_T Memory2_X0_c;                 /* Expression: 0
                                        * Referenced by: '<S15>/Memory2'
                                        */
  real_T Memory1_X0_n;                 /* Expression: 0
                                        * Referenced by: '<S15>/Memory1'
                                        */
  real_T Memory_X0_ki;                 /* Expression: 0
                                        * Referenced by: '<S15>/Memory'
                                        */
  real_T Gain_Gain_g1;                 /* Expression: 1/6
                                        * Referenced by: '<S15>/Gain'
                                        */
  real_T Memory8_X0_h;                 /* Expression: 0
                                        * Referenced by: '<S16>/Memory8'
                                        */
  real_T Memory7_X0_m;                 /* Expression: 0
                                        * Referenced by: '<S16>/Memory7'
                                        */
  real_T Memory6_X0_c;                 /* Expression: 0
                                        * Referenced by: '<S16>/Memory6'
                                        */
  real_T Memory5_X0_m;                 /* Expression: 0
                                        * Referenced by: '<S16>/Memory5'
                                        */
  real_T Memory4_X0_c;                 /* Expression: 0
                                        * Referenced by: '<S16>/Memory4'
                                        */
  real_T Memory3_X0_c;                 /* Expression: 0
                                        * Referenced by: '<S16>/Memory3'
                                        */
  real_T Memory2_X0_g;                 /* Expression: 0
                                        * Referenced by: '<S16>/Memory2'
                                        */
  real_T Memory1_X0_kj;                /* Expression: 0
                                        * Referenced by: '<S16>/Memory1'
                                        */
  real_T Memory_X0_kf;                 /* Expression: 0
                                        * Referenced by: '<S16>/Memory'
                                        */
  real_T Gain_Gain_ge;                 /* Expression: 1/6
                                        * Referenced by: '<S16>/Gain'
                                        */
  real_T Memory8_X0_g;                 /* Expression: 0
                                        * Referenced by: '<S17>/Memory8'
                                        */
  real_T Memory7_X0_k;                 /* Expression: 0
                                        * Referenced by: '<S17>/Memory7'
                                        */
  real_T Memory6_X0_k;                 /* Expression: 0
                                        * Referenced by: '<S17>/Memory6'
                                        */
  real_T Memory5_X0_i;                 /* Expression: 0
                                        * Referenced by: '<S17>/Memory5'
                                        */
  real_T Memory4_X0_d;                 /* Expression: 0
                                        * Referenced by: '<S17>/Memory4'
                                        */
  real_T Memory3_X0_cy;                /* Expression: 0
                                        * Referenced by: '<S17>/Memory3'
                                        */
  real_T Memory2_X0_ov;                /* Expression: 0
                                        * Referenced by: '<S17>/Memory2'
                                        */
  real_T Memory1_X0_o;                 /* Expression: 0
                                        * Referenced by: '<S17>/Memory1'
                                        */
  real_T Memory_X0_dd;                 /* Expression: 0
                                        * Referenced by: '<S17>/Memory'
                                        */
  real_T Gain_Gain_gp;                 /* Expression: 1/6
                                        * Referenced by: '<S17>/Gain'
                                        */
  real_T Memory8_X0_b;                 /* Expression: 0
                                        * Referenced by: '<S18>/Memory8'
                                        */
  real_T Memory7_X0_ec;                /* Expression: 0
                                        * Referenced by: '<S18>/Memory7'
                                        */
  real_T Memory6_X0_g;                 /* Expression: 0
                                        * Referenced by: '<S18>/Memory6'
                                        */
  real_T Memory5_X0_bi;                /* Expression: 0
                                        * Referenced by: '<S18>/Memory5'
                                        */
  real_T Memory4_X0_i;                 /* Expression: 0
                                        * Referenced by: '<S18>/Memory4'
                                        */
  real_T Memory3_X0_cb;                /* Expression: 0
                                        * Referenced by: '<S18>/Memory3'
                                        */
  real_T Memory2_X0_po;                /* Expression: 0
                                        * Referenced by: '<S18>/Memory2'
                                        */
  real_T Memory1_X0_f;                 /* Expression: 0
                                        * Referenced by: '<S18>/Memory1'
                                        */
  real_T Memory_X0_j;                  /* Expression: 0
                                        * Referenced by: '<S18>/Memory'
                                        */
  real_T Gain_Gain_p;                  /* Expression: 1/6
                                        * Referenced by: '<S18>/Gain'
                                        */
  real_T Memory8_X0_l;                 /* Expression: 0
                                        * Referenced by: '<S10>/Memory8'
                                        */
  real_T Memory7_X0_p;                 /* Expression: 0
                                        * Referenced by: '<S10>/Memory7'
                                        */
  real_T Memory6_X0_o;                 /* Expression: 0
                                        * Referenced by: '<S10>/Memory6'
                                        */
  real_T Memory5_X0_p;                 /* Expression: 0
                                        * Referenced by: '<S10>/Memory5'
                                        */
  real_T Memory4_X0_p;                 /* Expression: 0
                                        * Referenced by: '<S10>/Memory4'
                                        */
  real_T Memory3_X0_b4;                /* Expression: 0
                                        * Referenced by: '<S10>/Memory3'
                                        */
  real_T Memory2_X0_c5;                /* Expression: 0
                                        * Referenced by: '<S10>/Memory2'
                                        */
  real_T Memory1_X0_h;                 /* Expression: 0
                                        * Referenced by: '<S10>/Memory1'
                                        */
  real_T Memory_X0_i;                  /* Expression: 0
                                        * Referenced by: '<S10>/Memory'
                                        */
  real_T Gain_Gain_j;                  /* Expression: 1/6
                                        * Referenced by: '<S10>/Gain'
                                        */
  real_T Switch_Threshold;             /* Expression: 5
                                        * Referenced by: '<S6>/Switch'
                                        */
  real_T Constant_Value_c;             /* Expression: const
                                        * Referenced by: '<S20>/Constant'
                                        */
  real_T Gain3_Gain_i3;                /* Expression: -1
                                        * Referenced by: '<S21>/Gain3'
                                        */
  real_T Gain1_Gain_g;                 /* Expression: 0
                                        * Referenced by: '<S3>/Gain1'
                                        */
  real_T Gain2_Gain_f;                 /* Expression: 10000
                                        * Referenced by: '<S3>/Gain2'
                                        */
  real_T Saturation_UpperSat_l;        /* Expression: 1
                                        * Referenced by: '<S3>/Saturation'
                                        */
  real_T Saturation_LowerSat_n;        /* Expression: -1
                                        * Referenced by: '<S3>/Saturation'
                                        */
  real_T Constant2_Value_d;            /* Expression: mag_max_x
                                        * Referenced by: '<S3>/Constant2'
                                        */
  real_T Constant1_Value_a;            /* Expression: mag_max_y
                                        * Referenced by: '<S3>/Constant1'
                                        */
  real_T Constant3_Value_el;           /* Expression: mag_max_z1
                                        * Referenced by: '<S3>/Constant3'
                                        */
  real_T Constant4_Value_k;            /* Expression: mag_max_z2
                                        * Referenced by: '<S3>/Constant4'
                                        */
};

/* Real-time Model Data Structure */
struct RT_MODEL_control2 {
  const char_T * volatile errorStatus;
};

/* Block parameters (auto storage) */
extern Parameters_control2 control2_P;

/* Block signals (auto storage) */
extern BlockIO_control2 control2_B;

/* Block states (auto storage) */
extern D_Work_control2 control2_DWork;

/* External outputs (root outports fed by signals with auto storage) */
extern ExternalOutputs_control2 control2_Y;

/* Model entry point functions */
extern void control2_initialize(void);
extern void control2_step(void);
extern void control2_terminate(void);

/* Real-time Model object */
extern struct RT_MODEL_control2 *control2_M;

/*-
 * The generated code includes comments that allow you to trace directly
 * back to the appropriate location in the model.  The basic format
 * is <system>/block_name, where system is the system number (uniquely
 * assigned by Simulink) and block_name is the name of the block.
 *
 * Use the MATLAB hilite_system command to trace the generated code back
 * to the model.  For example,
 *
 * hilite_system('<S3>')    - opens system 3
 * hilite_system('<S3>/Kp') - opens and selects block Kp which resides in S3
 *
 * Here is the system hierarchy for this model
 *
 * '<Root>' : control2
 * '<S1>'   : control2/PID
 * '<S2>'   : control2/Subsystem
 * '<S3>'   : control2/Subsystem1
 * '<S4>'   : control2/PID/Subsystem
 * '<S5>'   : control2/PID/Subsystem1
 * '<S6>'   : control2/PID/Subsystem2
 * '<S7>'   : control2/PID/Subsystem3
 * '<S8>'   : control2/PID/Subsystem4
 * '<S9>'   : control2/PID/Subsystem2/Subsystem1
 * '<S10>'  : control2/PID/Subsystem2/Subsystem10
 * '<S11>'  : control2/PID/Subsystem2/Subsystem2
 * '<S12>'  : control2/PID/Subsystem2/Subsystem3
 * '<S13>'  : control2/PID/Subsystem2/Subsystem4
 * '<S14>'  : control2/PID/Subsystem2/Subsystem5
 * '<S15>'  : control2/PID/Subsystem2/Subsystem6
 * '<S16>'  : control2/PID/Subsystem2/Subsystem7
 * '<S17>'  : control2/PID/Subsystem2/Subsystem8
 * '<S18>'  : control2/PID/Subsystem2/Subsystem9
 * '<S19>'  : control2/Subsystem/Subsystem
 * '<S20>'  : control2/Subsystem1/Compare To Constant
 * '<S21>'  : control2/Subsystem1/Control mag
 * '<S22>'  : control2/Subsystem1/CrossProduct3
 * '<S23>'  : control2/Subsystem1/CrossProduct3/Subsystem
 * '<S24>'  : control2/Subsystem1/CrossProduct3/Subsystem1
 */
#endif                                 /* RTW_HEADER_control2_h_ */

/*
 * File trailer for Real-Time Workshop generated code.
 *
 * [EOF]
 */
